<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<html>
	<head>
		<title>封条管理及验证系统--业务单管理</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	</head>
	<LINK href="<%=request.getContextPath()%>/css/cssCn.css"
		type="text/css" rel="stylesheet">
	<%@ include file="/comm.jsp"%>
	<script language="javascript">
	$(document).ready(function() {
		$("#menu_1").mouseover(function() {
			$(this).css("background","#FFFFFF");
		});
		$("#menu_1").mouseout(function() {
			$(this).css("background","#EAF0FB");
		});
		$("#menu_2").mouseover(function() {
			$(this).css("background","#FFFFFF");
		});
		$("#menu_2").mouseout(function() {
			$(this).css("background","#EAF0FB");
		});
		$("#menu_3").mouseover(function() {
			$(this).css("background","#FFFFFF");
		});
		$("#menu_3").mouseout(function() {
			$(this).css("background","#EAF0FB");
		});
		$("#menu_4").mouseover(function() {
			$(this).css("background","#FFFFFF");
		});
		$("#menu_4").mouseout(function() {
			$(this).css("background","#EAF0FB");
		});
		$("#menu_5").mouseover(function() {
			$(this).css("background","#FFFFFF");
		});
		$("#menu_5").mouseout(function() {
			$(this).css("background","#EAF0FB");
		});
		
		$("#menu_1").click(function() {
			$("#hdfStatus").val("1"); //all
			$('#busiInfo_list').submit(); 
		});
		$("#menu_2").click(function() {
			$("#hdfStatus").val("2"); //进行中
			$('#busiInfo_list').submit(); 
		});
		$("#menu_3").click(function() {
			$("#hdfStatus").val("3"); //中途开封
			$('#busiInfo_list').submit(); 
		});
		$("#menu_4").click(function() {
			$("#hdfStatus").val("4"); //已完成
			$('#busiInfo_list').submit(); 
		});
	});
</script>

<style type="text/css">
<!--
fieldset {
	padding: 10px;
	margin: 10px;
	width: 270px;
	color: #333;
}

legend {
	color: #06c;
	font-weight: 800;
}

.menubar {
	width: 100px;
	cursor: hand;
}
-->
</style>
	<body>
		<s:form name="formpage" action="busiInfo_list" namespace="/">
			<table>
				<tr>
					<td align="left">
						我的业务单提醒： 进行中(0) &nbsp; 中途开封(0) &nbsp; 代收审核(0)
					</td>
				</tr>
			</table>
			<div align="center">
				<%@ include file="/messages.jsp"%>
				<fieldset>
					<legend>
						查询条件
					</legend>
					<table align="center" width="800px" border="0">
						<tr>
							<td align="right">
								日期：
							</td>
							<td width="230px">
								<input id="dStartdate" name="busiInfoDto.fromDate"
									value='<s:date name="#request.busiInfoDto.fromDate" format="yyyy-MM-dd" />'
									size="13" class="Wdate" type="text"
									onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'dEnddate\')}'})" />
								至
								<input id="dEnddate" name="busiInfoDto.toDate"
									value='<s:date name="#request.busiInfoDto.toDate" format="yyyy-MM-dd" />'
									size="13" class="Wdate" type="text"
									onFocus="WdatePicker({minDate:'#F{$dp.$D(\'dStartdate\')}'})" />
							</td>
							<td align="right">
								业务单号：
							</td>
							<td>
								<input name="busiInfoDto.busiNo" value="${busiInfoDto.busiNo}"
									type="text" maxlength="20" size="15" />
							</td>
							<td align="center">
							</td>
						</tr>
						<tr>
							<td align="right">
								账户代码：
							</td>
							<td>
								<input name="busiInfoDto.userId" value="${busiInfoDto.userId}"
									type="text" maxlength="20" size="15"
									onkeydown="focusNext('seqId')" />
							</td>
							<td align="right">
								柜号/车牌号：
							</td>
							<td>
								<input name="busiInfoDto.carrierNo" type="text" maxlength="20"
									size="15" value="" />
							</td>
							<td align="center">
								<input type="submit" class="button" id="ok" name="ok"
									value="查 询" />
								<input type="reset" class="button" id="resets" value="重 置" />
							</td>
						</tr>
					</table>
				</fieldset>
			</div>

			<table border="0" cellpadding="0" cellspacing="1" class="tb_input"
				id="tblone1">
				<tr class="list_tr_item">
					<td id="menu_1" class="td_title menubar">
						全部
					</td>
					<td id="menu_2" class="td_title menubar">
						进行中
					</td>
					<td id="menu_4" class="td_title menubar">
						已完成
					</td>
					<td id="menu_3" class="td_title menubar">
						中途开封
					</td>
					<td id="menu_5" class="td_title">
						&nbsp;
					</td>
					<s:hidden id="hdfStatus" name="busiInfoDto.status" value="1" />
				</tr>
			</table>

			<div id="divTab1">
				<table border="0" cellpadding="5" cellspacing="1" width="100%">
					<tr align="center" height="28px" valign="top">
						<td>
							<table width="100%" border="0">
								<tr>
									<td align="center">
										<b>货物信息</b>
									</td>
									<td width="150px">
										<b>集装箱/车牌号码</b>
									</td>
									<td width="120px">
										<b>状态</b>
									</td>
									<td width="120px">
										<b>操作</b>
									</td>
									<td width="90px">
										<b>备忘</b>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<s:iterator id="sa" value="#request.busilist">
						<tr>
							<td>
								<table width="100%" border="0">
									<tr>
										<td>
											<table width="100%">
												<tr>
													<td width="140px">
														业务单号：<a
															href="<s:url action="busiInfo_editPage"><s:param name="id">
																<s:property value="#sa.busiNo"/></s:param>
																<s:param name="op">0</s:param>
																</s:url>"><s:property
																value="#sa.busiNo" /> </a>
													</td>
													<td width="200px">
														创建时间：<s:date name="#sa.createDate" format="yyyy-MM-dd HH:mm" />
													</td>
													
													<td>
														<s:if test="#sa.sendCompanyid==#request.companyId">
												收货方：Kawo(HongKong) Industral Tehnology Limited
											</s:if>
														<s:else>
												发货方：Kawo(HongKong) Industral Tehnology Limited
											</s:else>
													</td>
													 
												</tr>
											</table>
										</td>
									</tr>
									<tr>
										<td height="30">
											<table width="100%" border="0">
												<tr>
													<td>
														&nbsp;<s:property value="#sa.goodsInfo" />
													</td>
													<td width="150px">
														<s:property value="#sa.carrierNo" />
													</td>
													<!-- 
													<td>
														Kawo(HongKong) Industral Tehnology Limited<br/>
														800002-admin
													</td>
													-->
													<td width="120px">
														<s:property value="showStatus(#sa)" />
													</td>
													<td width="120px">
														<s:if test="testEnsealFlag(#sa)">
															<a
																href="<s:url action="busiInfo_editPage"><s:param name="id"><s:property value="#sa.busiNo"/></s:param>
												<s:param name="op">1</s:param>
												</s:url>">
																加封 </a>
														</s:if>
														<s:if test="testCloseFlag(#sa)">
															<a
																href="<s:url action="busiInfo_editPage"><s:param name="id"><s:property value="#sa.busiNo"/></s:param>
												<s:param name="op">2</s:param>
												</s:url>">
																<s:if test="#sa.sendUserid==#request.userId">
														关闭业务单
													</s:if> <s:else>
														结束业务单
													</s:else> </a>
														</s:if>
														<s:if test="testAgentFlag(#sa)">
															<a
																href="<s:url action="busiInfo_applyPage"><s:param name="id"><s:property value="#sa.busiNo"/></s:param>
												</s:url>">
																代收申请 </a>
														</s:if>
														<s:if test="testAgentReplyFlag(#sa)">
															<a
																href="<s:url action="busiInfo_replyPage"><s:param name="id"><s:property value="#sa.busiNo"/></s:param>
												</s:url>">
																代收审核 </a>
														</s:if>
													</td>
													<td width="90px">
													<a
															href="<s:url action="busiInfo_editNoteinfo"><s:param name="id"><s:property value="#sa.busiNo"/></s:param>
												<s:param name="type"><s:property value="1"/></s:param>
												</s:url>"
															title="编辑备忘信息 , 仅自己可见"> 备忘 <s:if
																test='#sa.noteInfo !=null'>${#sa.noteInfo.noteIndex}
													<img
																	src="<%=request.getContextPath()%>/images/op_memo_<s:property value="#sa.noteInfo.noteIndex"/>.png" />
															</s:if> </a>
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
						</tr>


						<!-- 
				<tr class="list_tr_item"
						onMouseOver="javascript:this.className='tr_selected';"
						onMouseOut="javascript:this.className='tr_even';">
					<td>
						<a
							href="<s:url action="busiInfo_editPage"><s:param name="id">
							<s:property value="#sa.busiNo"/></s:param>
							<s:param name="op">0</s:param>
							</s:url>"><s:property value="#sa.busiNo" />
						</a>
					</td>
					<td>
						<s:date name="#sa.createDate" format="yyyy-MM-dd HH:mm"/>	
					</td>
					<td>
						<s:property value="showStatus(#sa)" /> 
					</td>
					<td>
						<s:property value="showType(#sa)" /> 
					</td>
					<td>
						<s:property value="showError(#sa)" />
					</td>
					<td>
						<s:property value="#sa.recvUserid" />
					</td>
					<td>
						<s:property value="#sa.carrierNo" />
					</td>
					<td>
						<s:property value="#sa.curSeqid" />
					</td>
					<td>
						<s:property value="#sa.goodsInfo" />
					</td>
					<td>
						<s:if test="testEnsealFlag(#sa)">
						<a
							href="<s:url action="busiInfo_editPage"><s:param name="id"><s:property value="#sa.busiNo"/></s:param>
							<s:param name="op">1</s:param>
							</s:url>">
							加封
						</a>
						</s:if>
						<s:if test="testCloseFlag(#sa)">
							<a href="<s:url action="busiInfo_editPage"><s:param name="id"><s:property value="#sa.busiNo"/></s:param>
							<s:param name="op">2</s:param>
							</s:url>">
								<s:if test="#sa.sendUserid==#request.userId">
									关闭业务单
								</s:if>
								<s:else>
									结束业务单
								</s:else> 
							</a>
						</s:if>
						<s:if test="testAgentFlag(#sa)">
						<a
							href="<s:url action="busiInfo_applyPage"><s:param name="id"><s:property value="#sa.busiNo"/></s:param>
							</s:url>">
						代收申请
						</a>
						</s:if>
						<s:if test="testAgentReplyFlag(#sa)">
						<a
							href="<s:url action="busiInfo_replyPage"><s:param name="id"><s:property value="#sa.busiNo"/></s:param>
							</s:url>">
						代收审核
						</a>
						</s:if>
						
						<a
							href="<s:url action="busiInfo_editNoteinfo"><s:param name="id"><s:property value="#sa.busiNo"/></s:param>
							<s:param name="type"><s:property value="1"/></s:param>
							</s:url>" title="编辑备忘信息 , 仅自己可见">
						备忘
							<s:if test='#sa.noteInfo !=null'>${#sa.noteInfo.noteIndex}
								<img src="<%=request.getContextPath()%>/images/op_memo_<s:property value="#sa.noteInfo.noteIndex"/>.png" />	
							</s:if>
						</a>
					</td>
				</tr>
				-->
					</s:iterator>
				</table>
			</div>
			<s:property value="#request.allowpage" escape="false" />
		</s:form>
	</body>
</html>
